package net.sppan.blog.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;

import net.sppan.blog.common.Constat;

@Entity
@Table(name = "tb_check")
public class Check implements Serializable {

	/**
	 * 
	 */
	private static final long	serialVersionUID	= -103340158242208150L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long				id;

	@ManyToOne
	@JoinColumn(name = "author_id")
	private User				author;
	/**
	 * 标题
	 */
	private String				title;
	/**
	 * 内容
	 */
	@Lob
	private String				content;
	/**
	 * 图片
	 */
	private String				file_ids;

	/**
	 * 头像图片
	 */
	@ManyToOne
	@JoinColumn(name = "headfile_id")
	private File				headFile;
	/**
	 * 昵称
	 */
	private String				nickName;
	/**
	 * 对错 1通过，0屏蔽
	 */
	private Integer				success;

	/**
	 * 原因
	 */

	@Lob
	private String				reason;

	/**
	 * 创建时间
	 */
	@JsonFormat(pattern = Constat.DATETIME_FORMAT, timezone = "GMT+8")
	private Date				createAt;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public User getAuthor() {
		return author;
	}

	public void setAuthor(User author) {
		this.author = author;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getFile_ids() {
		return file_ids;
	}

	public void setFile_ids(String file_ids) {
		this.file_ids = file_ids;
	}

	public File getHeadFile() {
		return headFile;
	}

	public void setHeadFile(File headFile) {
		this.headFile = headFile;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public Integer getSuccess() {
		return success;
	}

	public void setSuccess(Integer success) {
		this.success = success;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public Date getCreateAt() {
		return createAt;
	}

	public void setCreateAt(Date createAt) {
		this.createAt = createAt;
	}

}
